<meta charset="utf-8">
<link rel="stylesheet" href="<?=base_url();?>themes/base/jquery.ui.all.css">
<script type="text/javascript" src="<?=base_url()?>java_scripts/vote_scripts.js"></script>
<script src="<?=base_url();?>ui/jquery-1.5.1.js"></script>
<script src="<?=base_url();?>ui/jquery.ui.core.js"></script>
<script src="<?=base_url();?>ui/jquery.ui.widget.js"></script>
<script src="<?=base_url();?>ui/jquery.ui.datepicker.js"></script>
<link type="text/css" href="<?=base_url();?>css/demos.css" rel="stylesheet" />
<script>
$(function() {
    $( "#datepicker1" ).datepicker();
    $( "#datepicker2" ).datepicker();
});

function search_vote(url_string){
    document.forms[0].action=url_string;
    document.forms[0].submit();
}
</script>
	
<script type="text/javascript">
	function sortMe(event_id,sort_value){
		window.location="<?=site_url("vote/voteDetail")?>"+"/"+event_id+"/"+sort_value;
	}
	function search_vote(url_string){
		document.forms[0].action=url_string;
		document.forms[0].submit();
	}
</script>
<form name="" method="post" action="<?=site_url("vote/getAdvancedSearch")?>">
<div id="border">   
    <table width="100%" border="0" cellspacing="0" cellpadding="0">
     <tr>
     <td valign="top">       
        <table width="705" border="0" align="center" id="usertitle">
          <tr>
            <td><h3 style="">Advanced Search</h3></td>
            <td align="right"><img src="<?=base_url();?>images/Secure_connection.gif" alt="" width="116" height="22" /></td>
          </tr>
        </table>
        <div id="content">
        <div class="user_line_border_top">&nbsp;</div>
        <div style="margin:10px auto;"></div>
                
			    <table width="100%" border="0" cellpadding="0" cellspacing="0"  style="font-size: 12px;">
                <tr><td colspan="2" height="2" > </td></tr>
                <tr><td colspan="2" height="15"> </td></tr>
                <tr>
                    <td height="25" width="40%" class="ttd">Select Category :</td>
                    <td>&nbsp;&nbsp;<select name="selcat" id="selcat" style="width: 235px;" >
                                        <option value="0">All Categories</option>
                                        <?php 
                                            foreach ($categories->result_array() as $category) {
                                                /*if(isset($sel_cat_id)){
                                                    $selectMe=($sel_cat_id==$category['vote_item_cat_id'])?"selected":"";
                                                }else{
                                                    $selectMe=($category['vote_item_cat_id']==$topic['vote_item_cat_id'])?"selected":"";
                                                }*/
                                        ?>
                                        <option value="<?=$category['vote_item_cat_id']?>"><?=$category['vote_item_cat_desc']?></option>
                                        <?php 
                                            }
                                        ?>
                                    </select>
                    </td>
                </tr>
                <tr>
                    <td align="right" height="50" class="ttd">Closing Date :</td>
                    <td>&nbsp;&nbsp;<input type="text" id="datepicker1" name="txtclosefrom" style="width: 100px;"> To <input type="text" id="datepicker2" name="txtcloseto" style="width: 100px;"></td>
                </tr>
                <tr>
                    <td height="50"> </td>
                    <td>&nbsp;&nbsp;<input type="submit" class="kh_button" value="Search"  style="background:#BD2031; width:76px; height:24px; color:#fff; border:0;-webkit-border-radius: 3px;-moz-border-radius: 3px;border-radius: 3px; cursor:pointer;">
                    </td>
                </tr>
                <tr height="25"><td colspan="2"> </td></tr>
            </table>	
                
        </div>
        </td>
        <td width="254" valign="top">
			<?php include APPPATH."views/templates/common/right_content.php"; ?>
         </td>
         
      </tr>
  </table>
</div>
</form>